#!/usr/bin/perl
use strict;
use warnings;

my $item;
my %seen = ();
my @list = qw(1 1 1 2 3 4 4);
foreach $item (@list) {
  $seen{$item}++;
}
my @uniq = keys %seen;
print "@uniq\n";

